<!--#include("header.html")-->
<load target="js/point_admin.js" usecdn="true" />
<p>{$lang->about_point_module} {$lang->point_update_desc}</p>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
	<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<!-- 검색 -->
<form action="./" method="get" class="adminSearch" no-error-return-url="true">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />

    <fieldset>

        <select name="is_admin">
            <option value="" <!--@if($is_admin!='Y')-->selected="selected"<!--@end-->>{$lang->total}</option>
            <option value="Y" <!--@if($is_admin=='Y')-->selected="selected"<!--@end-->>{$lang->is_admin}</option>
        </select>
        <select name="is_denied">
            <option value="" <!--@if($is_denied!='Y')-->selected="selected"<!--@end-->>{$lang->total}</option>
            <option value="Y" <!--@if($is_denied=='Y')-->selected="selected"<!--@end-->>{$lang->denied}</option>
        </select>
        <select name="selected_group_srl">
            <option value="0">{$lang->member_group}</option>
            <!--@foreach($group_list as $key => $val)-->
            <option value="{$val->group_srl}" <!--@if($selected_group_srl==$val->group_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
            <!--@end-->
        </select>
        <select name="search_target">
            <option value="">{$lang->search_target}</option>
			<option value="{$identifier}" selected="selected"|cond="$search_target == $identifier">{Context::getLang($identifier)}</option>
            <!--@foreach($lang->search_target_list as $key => $val)-->
            <option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
            <!--@end-->
        </select>
        <input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
        <span class="btn"><input type="submit" value="{$lang->cmd_search}" /></span>
        <span class="btn"><button type="button" onclick="location.href='{getUrl('','module',$module,'act',$act)}';return false;">{$lang->cmd_cancel}</button></span>
    </fieldset>
</form>
<div class="table form">	
	<table width="100%" border="1" cellspacing="0">
		<caption>Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}</caption>
		<thead>
			<tr>
				<th scope="col">{$lang->no}</th>
				<th scope="col">{Context::getLang($identifier)}</th>
				<th scope="col">{$lang->nick_name}</th>
				<th scope="col">{$lang->point}</th>
				<th scope="col">{$lang->level}</th>
			</tr>
		</thead>
		<tbody>
			<!--@foreach($member_list as $no => $val)-->
			<tr>
				<td>{$no}</td>
				<td cond="$identifier == 'user_id'">{$val->user_id}</td>
				<td cond="$identifier != 'user_id'">{$val->email_address}</td>
				<td><a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->nick_name}</a></td>
				<td>
					<form action="./" method="get">
						<input type="hidden" name="module" value="point" />
						<input type="hidden" name="member_srl" value="{$val->member_srl}" />
						<input type="text" name="orgpoint" value="{$val->point}" disabled="disabled" style="width:40px;text-align:right" />
						<input type="text" id="point_{$val->member_srl}" name="point" style="width:40px;text-align:right" />
						<input type="button" value="{$lang->cmd_update}" onclick="updatePoint({$val->member_srl})" class="text" />
					</form>
				</td>
				<td>{$val->level}</td>
			</tr>
			<!--@end-->
		</tbody>
	</table>
</div>

<form ruleset="updatePoint" id="updateForm" action="./" method="POST">
	<input type="hidden" name="module" value="point" />
	<input type="hidden" name="act" value="procPointAdminUpdatePoint" />
    <input type="hidden" id="update_member_srl" name="member_srl" value="" />
    <input type="hidden" id="update_point" name="point" />
</form>


<!-- 페이지 네비게이션 -->
<div class="pagination">
    <a href="{getUrl('page','','module_srl','')}" class="direction">&lsaquo; {$lang->first_page}</a>
    <!--@while($page_no = $page_navigation->getNextPage())-->
        <!--@if($page == $page_no)-->
            <strong>{$page_no}</strong>
        <!--@else-->
            <a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
        <!--@end-->
    <!--@end-->
    <a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} &rsaquo;</a>
</div>

<!-- 검색 -->
<form action="./" method="get" class="adminSearch" no-error-return-url="true">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />

    <fieldset>

        <select name="is_admin">
            <option value="" <!--@if($is_admin!='Y')-->selected="selected"<!--@end-->>{$lang->total}</option>
            <option value="Y" <!--@if($is_admin=='Y')-->selected="selected"<!--@end-->>{$lang->is_admin}</option>
        </select>
        <select name="is_denied">
            <option value="" <!--@if($is_denied!='Y')-->selected="selected"<!--@end-->>{$lang->total}</option>
            <option value="Y" <!--@if($is_denied=='Y')-->selected="selected"<!--@end-->>{$lang->denied}</option>
        </select>
        <select name="selected_group_srl">
            <option value="0">{$lang->member_group}</option>
            <!--@foreach($group_list as $key => $val)-->
            <option value="{$val->group_srl}" <!--@if($selected_group_srl==$val->group_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
            <!--@end-->
        </select>
        <select name="search_target">
            <option value="">{$lang->search_target}</option>
            <!--@foreach($lang->search_target_list as $key => $val)-->
            <option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
            <!--@end-->
        </select>
        <input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
        <span class="btn"><input type="submit" value="{$lang->cmd_search}" /></span>
        <span class="btn"><button type="button" onclick="location.href='{getUrl('','module',$module,'act',$act)}';return false;">{$lang->cmd_cancel}</button></span>
    </fieldset>
</form>
